/*
 * @Author: Li Zengkun
 * @Date: 2022-09-26 19:41:59
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-26 19:47:23
 * @Description: 
 */
import axios from "axios"

// 删除菜单
const remove = (id, params) => axios.delete(`/menu/${id}`, { params })

const update = (id, data) => axios.put(`/menu/${id}`, data)

const add = (data) => axios.post('/menu', data)

const getChild = (params) => axios.get('/menu/sub', { params })

const getAll = (params) => axios.get('/menu/all', { params })

const setIcon = (id, data) => axios.put(`/menu/icon/${id}`, data)

export default {
    remove,
    update,
    add,
    getChild,
    getAll,
    setIcon
}